﻿using Ast.Framework.Events;
using Ast.Framework.FileSystems.Dependencies;

namespace Ast.Framework.Environment.Extensions.Events
{
    public interface IExtensionEvents : IEventHandler
    {
        void OnActivated(ExtensionLoadingContext context, DependencyDescriptor extensionDescriptor);
        void OnDeactivated(ExtensionLoadingContext context, DependencyDescriptor extensionDescriptor);
        void OnRemoved(ExtensionLoadingContext context, DependencyDescriptor dependencyDescriptor);
    }

    public abstract class ExtensionEvents : IExtensionEvents
    {
        public virtual void OnActivated(ExtensionLoadingContext context, DependencyDescriptor extensionDescriptor)
        {
        }

        public virtual void OnDeactivated(ExtensionLoadingContext context, DependencyDescriptor extensionDescriptor)
        {
        }

        public virtual void OnRemoved(ExtensionLoadingContext context, DependencyDescriptor dependencyDescriptor)
        {
        }
    }
}